﻿///////////////////////////////////////////////////////////////////////////
// 文件名:     progresswidget.h
// 描述:
// 作者:      颜磊
// 创建时间:   2024-06-09 00:47
///////////////////////////////////////////////////////////////////////////
#ifndef PROGRESSWIDGET_H
#define PROGRESSWIDGET_H

#include <QWidget>
#include <progressinfo.h>

namespace Ui
{
class ProgressWidget;
}

class ProgressWidget : public QWidget
{
    Q_OBJECT

public:
    explicit ProgressWidget(ProgressInfo &progressInfo, QWidget *parent = nullptr);
    ~ProgressWidget();
    void setScreenshotData(QByteArray data);
    void setScreenshotPixmap(QPixmap pixmap);
    ProgressInfo getProgressInfo() const;
    void setProgressInfo(const ProgressInfo &value);

signals:
    void signal_editProgress(uint64_t connectId, ProgressInfo progressInfo); //此处发出还要进行编辑，编辑的操作交给固定窗口来操作;
    void signal_ScreenshotData(QByteArray data);
private slots:
    void on_ProgressWidget_customContextMenuRequested(const QPoint &pos);
    void slot_seeProgress();
    void slot_upProgress();
    void slot_delProgress();
    void slot_startProgress();
    void slot_stopProgress();

private:
    Ui::ProgressWidget *ui;
    QByteArray screenData;
    QPixmap screenshotPixmap;
    ProgressInfo progressInfo;
};

#endif // PROGRESSWIDGET_H
